<!--#include file="./doctype.html"-->
<title>大类管理-<%=siteTitle%>-后台管理</title>
</head><body>
<div class="wrap">
    <ol class="breadcrumb">
        <li class="active"><a href="<%=fileName%>">列表首页</a></li>
    </ol>
	<form method="get" action="<%=fileName%>" class="mb10" role="form">
		<input type="hidden" value="index" name="q">
        <div class="mt15 mb15">
            <%
            dim allType, cur
            allType = array("不限", "产品类", "留言类", "文章类")
			for i = 0 to 3
				if genreType = i then cur = "btn-primary" else cur = "btn-default"
				%><a href="<%=fileName%>?q=index&genreType=<%=i%>" class="btn btn-xs <%=cur%>"><%=allType(i)%></a>
			<% next %>
		</div>
	</form>
	<% if isArray(data) then %>
		<table class="table table-bordered">
			<thead>
				<tr>
					<th>大类ID</th>
					<th>大类名称</th>
					<th>项目名称</th>
					<th>项目单位</th>
					<th>大类首页模板ID</th>
					<th>启用？</th>
					<th>操作</th>
				</tr>
			</thead>
			<tbody>
			<% for i = 0 to ubound(data, 2)
			    Tid = data(0,i)
			    isStop = app.cj_bool(data(5,i))
			    %>
				<tr>
					<td><label><input type="checkbox" name="batchId" value="<%=Tid%>" /> <%=Tid%></label></td>
					<td><a href="<%=fileName%>?q=edit&id=<%=Tid%>"><%=data(1,i)%></a></td>
					<td><%=data(2,i)%></td>
					<td><%=data(3,i)%></td>
					<td><a href="./view.asp?q=edit&id=<%=data(4,i)%>">修改[<%=data(4,i)%>]</a></td>
					<td class="setBool" data-value="<%=data(5,i)%>"></td>
					<td>
                    <% if isStop then%>
                        <span title="启用" class="btn btn-xs text-success statusOne" data-id="<%=Tid%>" data-status="0">
                            <i class="glyphicon glyphicon-ok"></i>
                        </span>
                    <% else %>
                        <span title="禁用" class="btn btn-xs text-danger statusOne" data-id="<%=Tid%>" data-status="1">
                            <i class="glyphicon glyphicon-remove"></i>
                        </span>
                    <% End if %>
                    <span title="删除" class="btn btn-xs text-danger deleteOne" data-id="<%=Tid%>">
                        <i class="glyphicon glyphicon-trash"></i>
                    </span>
                    </td>
				</tr>
			<% next %>
			</tbody>
		</table>
		<!--#include file="page.html"-->
	<% else %>
		<!--#include file="noData.html"-->
	<% End if %>
    <!--#include file="loadTime.html"-->
</div>
<script>
$(document).ready(function(){
    $('.setBool').setBool(0);
$(this)
	.on('click', '.deleteOne', function() {
		$(this).deleteOne();
	})
	.on('click', '.statusOne', function() {
		$(this).statusOne();
	})
});
</script>
</body>
</html>